package day_2022_9_to_12.Day;

/**
 * @author haomin
 * @date 2022/10/19 14:47
 **/
public class Day47_1_Num1700_CountStudents {
    class Solution {
        public int countStudents(int[] students, int[] sandwiches) {
            int[] count = new int[2];
            for(int i : students) count[i]++;
            for(int i : sandwiches){
                if(count[i] > 0) count[i]--;
                else break;
            }
            return count[0] + count[1];
        }
    }
}